#include<iostream>
#include<iomanip>
using namespace std;

int main()                  //计算数列和
{
    int q1 = 2,p1 = 1;
    double a1 = q1/(double)p1;
    int n;
    cin >> n;
    double sum = a1;
    double temq = q1,temp = p1;
    for(int i = 1;i<n;i++)
    {
        double ai = 0;
        int q = temq;
        temq = temq + temp;
        temp = q ;
        ai = temq/(double)temp;
        sum = sum + ai;
    }
    cout << fixed << setprecision(4) << sum << endl;
    return 0;
}